package com.firexxx.vp.domain.stb;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @description: TODO
 * @throws:
 * @author: zhuangzhang2
 * @date: 2019/12/11 16:04
 */
@Repository
public interface StbRepository extends JpaRepository<StbEntity, Long> {

    @Query(value = "select * from stb where stb_id = ?1 or mac = ?2 limit 1", nativeQuery = true)
    StbEntity getOneByStbIdOrMac(String stbId, String mac);
}